package com.kakarote.admin.service;

import com.kakarote.admin.common.AdminModuleEnum;
import com.kakarote.admin.entity.PO.AdminApply;
import com.kakarote.core.servlet.BaseService;

import java.io.Serializable;

/**
 * <p>
 * 应用申请信息表 服务类
 * </p>
 *
 * @author zhangzhiwei
 * @since 2022-01-07
 */
public interface IAdminApplyService extends BaseService<AdminApply> {

    void addApply(AdminModuleEnum moduleEnum, Long companyId);

    /**
     * 查询字段配置
     *
     * @param id 主键ID
     * @return data
     * @author zhangzhiwei
     * @since 2022-01-07
     */
    public AdminApply queryById(Serializable id);

    /**
     * 保存或新增信息
     *
     * @param entity entity
     * @author zhangzhiwei
     * @since 2022-01-07
     */
    public void addOrUpdate(AdminApply entity);

    /**
     * 修改应用剩余次数
     *
     * @param name   应用名称
     * @param number 使用次数
     * @return 操作条数，0为操作失败
     */
    Integer updateAdminApplyNumberInfo(String name, Integer number);

    Integer saveAdminApply(AdminApply adminApply);

    Integer updateAdminApplyById(AdminApply adminApply);

}
